home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 June
/
EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso
/
earcd
/
gui
/
mgnfclss.rdm
< prev
next >
Wrap
Text File
|
1996-05-20
|
8KB
|
182 lines
Short: Picture magnifying class for BGUI including source code
Author: Reinhard Katzmann (suamor@student.uni-tuebingen.de)
Uploader: Reinhard Katzmann (suamor@student.uni-tuebingen.de)
Type: dev/gui
MagnifyClass Version 39.1
-------------------------
MagnifyClass is (C) 1995/96 by Reinhard Katzmann and FREEWARE. All Rights reserved.
Introduction
------------
This is the second release of Magnifyclass, a picture sizing (or magnify-
ing) class for BGUI. I've included a test program (testmagnifyclass) for
playing around. For closer information read magnifyclass.doc.
If you don't know what the hell BGUI is, read the BGUI.intro text file :-)
The usage of the class is similar to paletteclass or popbuttonclass which came
both with BGUI12. The class was written with SAS/C6.56 but should work fine
with other compilers, too. Please tell mel if you have any problems compiling
the class. If you have compiled the class, simply link it with your program
using the class. SAS/C-User may not forget to set the NOSTACKCHECK Option!!
(This should belong to th BGUI-FAQ ;-)
Copyright & Disclaimer
----------------------
MagnifyClass is (C) 1995/96 by Reinhard Katzmann. All Rights reserved.
MagnifyClass is FREEWARE, i.e. you must not pay me anything using it with
Public Domain, Freeware, Shareware and Giftware programs. Usage in commercial
programs is NOT allowed without the written permission from me! It may and
should be distributed on the BGUI Home Page and to the BGUI ftp server(s).
Ian J. Einman has the exclusive right to add the (hopefully) bug-free version
with the coming BGUI release(s).
Changes since last (beta) release
---------------------------------
- Requires V39 of the BGUI library (If you look at the version number you see
which Version the class actually requires)
- Some minor bug fixes
- Added support for shared lib like done paletteclass V2.1
- Version support, starts with V39.1, identical to bgui.library Version
i.e. a future V40 Version would require bgui.library V40 (SLib Version only)
- Added more checks for NULL-Pointers in BitMaps
- Added sanity check in MyAllocBitMap/FreeBitMap if GfxBase was opened and if
there actually was a BitMap as argument, else the shared libb version would
have crashed badly :-(
- Big Bugs: There were some references to bitmap->Planes which are not allowed
- No longer needs bitmap.library (this lib which was buggy anyway)
- BitMapScale() requires to allocate a temporary bitmap, it does not operate
directly on the windows bitmap. This may slow the rendering down a bit.
- Finally added a save function to the demo.
Usage
-----
You need to have installed bgui.library V39 or better. Also the demo program
uses iff.library for loading iff images.
There exist two (or three) possibilities to use it. Either you use it as
external gadget class (this is important if you don't program in C/C++
and you can not include SAS/C link libs in your code) or as an SAS/C
(Dice/GCC ?) Link Library. You also can simply compile it and include
the resulting object file. Warning: I did not create an option in the
smakefile for DATA=FAR (i.e. tell the compiler to use 32 bit-references
instead of 16bit). But I don't think it's difficult for you to add it,
in case you need it in your application.
I would not use it as external (shared library) gadget class because the
size of gadget class + app is ~10k bigger than using it with link lib. It
would only be useful if many apps are using it or if the language you are
programming is unable to understand SAS/C object code or any other you may
generate (like with the free version of DICE or with gcc).
Warning: I did not test it under V37. This mainly concerns the Alloc/Free
functions of the bitmaps.
Source Code:
------------
The source code is provided to compile and to link with your program. It may
not be changed or altered in any way! If you have ideas for improving it
somehow please send them to me and I then will consider implementing them
(of course I keep the last word). In no case you may make a new magnifying
class out of this source. But you are allowed to make a new class out of it
that has really other aims than this class. This new class must be distributed
under the same condition as the using (i.e. it may NOT be sold commercial!).
If you decide to do so you must state in your documentation the line:
"This class is based on MagnifyClass (c) 1995/96 Reinhard Katzmann"
(as I have stated in my source code on which it is based).
If there are any problems with Dice/GCC compiler building a link library you
should try to solve it (I don't own/use either) and send me diffs so I my be
able to include them in a new release. Please use #ifdef _GCC or similar to
indicate the changes.
Resource Tracking: If you turn it on, you will notice that the executables
nearly double in size. I decided to not distribute such a Version.
Disclaimer
----------
This program is provided "as is" without warranty of any kind, either
expressed or implied, including, but not limited to, the implied
warranties of merchantability and fitness for a particular purpose.
The entire risk as to the quality and the performance of this collection
is with you. In no event can I be liable to you for damages of any kind
arising out of the use of this program or any part of it's archive, or the
inability to use it.
Known Bugs
----------
I have problems with allocating the correct size of the temporary bitmap.
Currently I use ( Magfactor + Grid (if present) ) multiplied by the size of
the part of the image which is to be shown plus (and this is what I find
very strange) the Start point of the image. If I do omit the last I get
Mungwall/Enforcer Hits (i.e. it goes beyond the size of the allocated bitmap).
I can't explain why this happens because the size of the partly shown
image must still be the same.
This is also a prove to me that ScalerDiv() must be wrong, because if it
was true, the above problem may not appear.
In the demo: the number showing the magnification is not rendered correctly
on my system. Maybe one of the frame rendering bugs in the current BGUI
V41.3. Hints are welcome :-).
The demo does loading/saving of pictures using iff.library which is based on
V37, so uses RGB4 colortables instead of RGB32. This may lead to difficulties.
I'd like to have load/save functions which work on both V37 and V39 (+ GFX
boards as I have a Picasso II, but not dependant on WB-Emu Software if
possible). If you can help me with that or have a function/link lib supporting
loading and saving in an OS-legal way on both V37 and V39 and want to share
it, let me know about it.
Future:
-------
I will mainly concentrate on removing bugs. The class itself does not need to
be further extended (at least I have no ideas). The demo could support Data-
types for loading/saving images on V39+ systems. Also I would be possible to
add a palette selector gadget so you can draw in different colours. Further
expansions are up to you ;) (You can make a real WB paint program out of it
if you want to - but if you decide to go Shareware I want a free Version!).
Send me all you ideas/bugs (else I have no motivation to continue it).
Contacting:
-----------
Send bugs, comments, ideas, flames to:
E-MAIL (preferred):
-------------------
suamor@student.uni-tuebingen.de
Reinhard_Udo.Katzmann@student.fh-reutlingen.de
SnailMail:
----------
Reinhard Katzmann
Schellingstraße 41
D - 72072 Tübingen
BBS'es
------
You can try to reach me through BBS'es near Tübingen. Some of the Sysops
might know me or have contact to the Internet. I'm only User of one BBS:
Onkel Helmut's Hütte
Line 1: (0049) +7157/64546 (28800 Baud)
Line 2: (0049) +7157/65428 (14400 Baud)
My usual Nickname on the internet or at this BBS is Suamor.